<template>
  <div class="hello">
    <ul>
      <li :for="item in data" >{{item.id}}:{{item.name}}</li>
    </ul>
  </div>
</template>

<script>
import axios from 'axios';
export default {
  name: 'HelloWorld',
  data() {
    return {
      data : []
    }
  },
  mounted() {
    axios.get('http://localhost:3000/api/users').then(res => this.data = res.data)
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
